<template>
  <div class="reward-container">
    <div class="reward-btn" @click="showReward">
      <i class="fas fa-yen-sign"></i>
      <span>打赏</span>
    </div>
    

    <el-dialog :visible.sync="isShow" @close="hideReward" width="600px" height="auto">
      <div class="reward-popup-content">
        <h3>感谢您的支持！</h3>
        <div class="reward-qrcode-container">
          <div class="qrcode-item">
            <img :src="$store.state.webSiteInfo.aliPay" alt="支付宝收款码">
            <p>支付宝打赏</p>
          </div>
          <div class="qrcode-item wechat">
            <img :src="$store.state.webSiteInfo.weixinPay" alt="微信收款码">
            <p>微信打赏</p>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'Reward',
  data() {
    return {
      isShow: false,
    }
  },
  methods: {
    showReward() {
      this.isShow = true
    },
    hideReward() {
      this.isShow = false
    }
  }
}
</script>

<style scoped>
.reward-container {
  text-align: center;
  margin: 20px 0;
}

.reward-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: #f56c6c;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  gap: 10px;
}

.reward-btn:hover {
  background: #f78989;
}

.reward-qrcode-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.qrcode-item {
  text-align: center;
}

.qrcode-item img {
  width: 250px;
  height: 250px;
}

.wechat img {
  width: 250px;
  height: 250px;
}

.qrcode-item p {
  color: #666;
}
</style> 